package com.itheima.d3_inner_class3;

public class Test2Practice {
    public static void main(String[] args) {
        go(new Swimming1() {
            @Override
            public void swim() {
                System.out.println("猫猫在游泳～");
            }
        });
    }

    public static void go(Swimming1 s) {
        System.out.println("-----开始-----");
        s.swim();
        System.out.println("-----结束-----");
    }
}

interface Swimming1{
    void swim();
}
